// antd 按需加载
import { Toast } from '@ant-design/react-native';

import store from '../../../store/store.js'
import * as ActionTypes from '../../../constants/constants.js'
import { isUser, isWxUser, path, saveData, loadData, removeData, requestMessage } from '../../../util/utils.js'
import request from '../../../api/request.js'

export async function forgetPassword(options) {
    const { dispatch } = this.props
    const loading = Toast.loading('重置密码中', 0, null, false)
    const res = await request.MemberController.forgetPassword(options)
    return requestMessage(res, loading, {
        success: '重置成功',
        error: res.data.message
    })
}
